/**
  ******************************************************************************
  * @file           : weight.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  ******************************************************************************
  */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __ROUTE_485_H
#define __ROUTE_485_H

#include <stdint.h>
#include "bsp.h"
#include "tskcfg.h"
#include "route_base.h"

#define ROUTE_PAYLOAD_MAXLEN              136
#define RS485_LOCAL_ADDRESS               (0xFEu)

#define ROUTE_485RXLINK_QUE_LENGTH        20
#define ROUTE_485RXLINK_QUE_ITEMSIZE      sizeof(Route_PayloadType)

extern Route_PayloadType Route_485_rx_link_isr;
extern Route_PayloadType Route_485_rx_link_bck;

extern uint8_t RS485_LocalAddr;

extern void RS485_GetLocalAddress(void);
extern uint8_t RS485_LinkSend(Route_PayloadType *rtpl);
extern void RS485_BspInit(void);

extern void Route_SubDevInstructLed(void);

/* 在具体的子设备文件中实现 */
extern const Route_DevType_Type Route_LocalDevType;
extern uint8_t Route_expio_xx_rxprocess(Route_PayloadType *inpl, Route_PayloadType *outpl);

#endif /* __ROUTE_485_H */

